import axios from 'axios'
import { ElMessage } from 'element-plus'

const instance = axios.create({
  baseURL:'/api'
})

instance.interceptors.request.use(cfg=>{

  return cfg
},err=>Promise.reject(err))
instance.interceptors.response.use(res=>{
  ElMessage.err('abc')
  return res.data
},err=>Promise.reject(err))

export default instance